package com.umgsai.thread.thread01;

public class User {

	private String username = "a";
	private String password = "aaa";
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	synchronized public void printString(String username, String password){
		try {
			this.username = username;
			Thread.sleep(20000);
			this.password = password;
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
